package com.zero.state.context;


import com.zero.state.mode.State;
import com.zero.state.mode.impl.NormalState;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;


@AllArgsConstructor
public class DragonSlayer {
    //灭龙魔导士的状态
    @Getter@Setter
    private State state;
    //调用无参时设置默认状态
    public DragonSlayer() {
        this(new NormalState());
    }
    //对客户端开放的功能
    public void attack(){
        state.handle(this);
    }
}
